package com.iweb.newa202104.Mapper;

import com.iweb.newa202104.dto.ResponseOutputDTO;
import com.iweb.newa202104.entity.ResponseEntity;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

/**
 * @Author: LGZ
 * @Date: 2021/5/12 18:25
 * @Description:
 */
@Mapper
@Component
public interface ResponseMapper {
    /**
     * TODO
     * @Description 添加评论
     * @Author lgz
     * @Date 2021/5/12 18:29
     * @param responseEntity :
     * @return : void
     */
    void addResponse(ResponseEntity responseEntity);

    /**
     * TODO
     * @Description 获取一篇帖子的所有评论，按时间排序
     * @Author lgz
     * @Date 2021/5/12 18:29
     * @param responseEntity :
     * @return : com.iweb.newa202104.dto.ResponseOutputDTO[]
     */
    ResponseOutputDTO[] getAll(ResponseEntity responseEntity);

    /**
     * TODO
     * @Description 获取我的回答数
     * @Author lgz
     * @Date 2021/5/18 11:39
     * @param responseEntity :
     * @return : int
     */
    int getMyResponseCounts(ResponseEntity responseEntity);

    /**
     * TODO
     * @Description 获取自己的评论
     * @Author lgz
     * @Date 2021/5/19 19:56
     * @param responseEntity :
     * @return : com.iweb.newa202104.dto.ResponseOutputDTO[]
     */
    ResponseOutputDTO[] getMyResponse(ResponseEntity responseEntity);

    /**
     * TODO
     * @Description 删除自己的评论
     * @Author lgz
     * @Date 2021/5/19 21:13
     * @param responseEntity :
     * @return : void
     */
    void delete(ResponseEntity responseEntity);

    /**
     * TODO
     * @Description 点赞
     * @Author lgz
     * @Date 2021/5/20 11:56
     * @param responseEntity :
     * @return : void
     */
    void giveLike(ResponseEntity responseEntity);

}
